#import "KiteVortexView.h"


@implementation KiteVortexView



- (void)setYarn:(KiteVortexModel *)yarn {
	_yarn = yarn;

	//: 配置cell的UI

	if (yarn.unveilHeatwave.count > 0) {
		[self.graciousImageView sd_setImageWithURL:[NSURL URLWithString:yarn.unveilHeatwave[0]] placeholderImage:nil];
	}

	self.onwardLabel.text = yarn.enchantingFeast ? @"YES" : @"NO";


}
- (UIView *)oliveView {
	if (!_oliveView) {
	
        _oliveView = [UIView new];
        _oliveView.frame = CGRectMake(24, 22, 139, 37);
	}
	return _oliveView;
}

- (UIImageView *)radiateImageView {
	if (!_radiateImageView) {
	
        _radiateImageView = [[UIImageView alloc] init];
        _radiateImageView.contentMode = UIViewContentModeScaleAspectFill;
        _radiateImageView.clipsToBounds = YES;
        _radiateImageView.layer.cornerRadius = 15;
        _radiateImageView.layer.masksToBounds = YES;
        _radiateImageView.size = CGSizeMake(79, 192);
        _radiateImageView.left = 39;
        _radiateImageView.top = 33;
        UIImage *cascade = [UIImage imageNamed:@"images/image_6.png"];
        if (cascade) {
	        _radiateImageView.image = cascade;
        }
	}
	return _radiateImageView;
}

//: nostalgia 的点击事件
- (void)action_7 {}

//: 设置yardHumbleBreeze的圆角
- (void)vivid:(UIImageView *)pathwayNirvana arcaneIdealPerceptive:(CGFloat)hummingbird {
	pathwayNirvana.layer.cornerRadius = hummingbird;
	pathwayNirvana.layer.masksToBounds = YES;
}

- (void)mellowYonderUnveilInitUIKitView {

    //: 描述_0
    self.graciousImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    self.graciousImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.graciousImageView.clipsToBounds = YES;
    self.graciousImageView.layer.cornerRadius = 16;
    self.graciousImageView.layer.masksToBounds = YES;
    UIImage *driftWanderKingdom = [UIImage imageNamed:@"images/image_0.png"];
    if (driftWanderKingdom) {
	    self.graciousImageView.image = driftWanderKingdom;
    }
    [self addSubview:self.graciousImageView];
	[self.graciousImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(57);
		make.height.mas_equalTo(75);
		make.bottom.equalTo(@(10));
	}];

	//: 描述_1
	[self addSubview:self.oliveView];


    //: 描述_2
    UITextField *juggleLuminary = [[UITextField alloc] init];
    self.balanceTextField = juggleLuminary;
    [self addSubview:juggleLuminary];
	[self.balanceTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(77);
		make.height.mas_equalTo(61);
	}];


    //: 描述_3
    self.onwardLabel = [UILabel new];
    self.onwardLabel.frame = CGRectMake(48, 39, 165, 100);
    self.onwardLabel.text = @"label_3";
    self.onwardLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
    self.onwardLabel.textColor = [UIColor colorWithRed:5/255.0 green:54/255.0 blue:212/255.0 alpha:1.0];
    self.onwardLabel.textAlignment = NSTextAlignmentRight;
    self.onwardLabel.numberOfLines = 3;
    [self addSubview:self.onwardLabel];


    //: 描述_4
    UIView *ideal = [[UIView alloc] init];
    ideal.size = CGSizeMake(46, 85);
    ideal.left = 40;
    ideal.top = 16;
    self.melancholyOliveView = ideal;
    [self addSubview:ideal];


    //: 描述_5
    UILabel *spiralWaffle = [[UILabel alloc] init];
    spiralWaffle.frame = CGRectMake(39, 43, 146, 199);
    spiralWaffle.text = @"label_5";
    spiralWaffle.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
    spiralWaffle.textColor = [UIColor colorWithRed:38/255.0 green:75/255.0 blue:242/255.0 alpha:0.7];
    spiralWaffle.textAlignment = NSTextAlignmentCenter;
    spiralWaffle.numberOfLines = 0;
    self.curiousGrinJourneyLabel = spiralWaffle;
    [self addSubview:spiralWaffle];

	//: 描述_6
	[self addSubview:self.radiateImageView];


    //: 描述_7
    UIButton *nostalgia = [[UIButton alloc] init];
    UIImage *xylophoneClarityEmbark = [UIImage imageNamed:@"images/icon_7.png"];
    if (xylophoneClarityEmbark) {
	    [nostalgia setImage:xylophoneClarityEmbark forState:UIControlStateNormal];
    }
    [nostalgia setTitle:@"button_7" forState:UIControlStateNormal];
    [nostalgia setTitle:@"button_selected_7" forState:UIControlStateSelected];
    [nostalgia setTitleColor:[UIColor colorWithRed:191/255.0 green:223/255.0 blue:9/255.0 alpha:0.6] forState:UIControlStateNormal];
    [nostalgia setTitleColor:[UIColor colorWithRed:210/255.0 green:26/255.0 blue:173/255.0 alpha:0.8] forState:UIControlStateSelected];
    [nostalgia addTarget:self action:@selector(action_7) forControlEvents:UIControlEventTouchUpInside];
    self.silhouetteButton = nostalgia;
    [self addSubview:nostalgia];
	[self.silhouetteButton mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(114);
		make.height.mas_equalTo(101);
		make.top.equalTo(@(28));
	}];


    //: 描述_8
    UIImageView *yardHumbleBreeze = [UIImageView new];
    yardHumbleBreeze.contentMode = UIViewContentModeScaleAspectFill;
    yardHumbleBreeze.clipsToBounds = YES;
    //: UIImageView的骚操作 充数
    [self vivid:yardHumbleBreeze arcaneIdealPerceptive:15];
    UIImage *nostalgiaCable = [UIImage imageNamed:@"images/image_8.png"];
    if (nostalgiaCable) {
	    yardHumbleBreeze.image = nostalgiaCable;
    }
    self.balanceGlowImageView = yardHumbleBreeze;
    [self addSubview:yardHumbleBreeze];
	[self.balanceGlowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(101);
		make.height.mas_equalTo(136);
		make.bottom.equalTo(@(16));
	}];
}


@end
